<%@ page import="java.util.List" %>
<%@ page import="com.situ.web.pojo.entity.Banji" %><%--
  Created by IntelliJ IDEA.
  User: Gao
  Date: 2024/4/3
  Time: 14:21
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form action="/student?method=add" method="post">
    用户名:<input type="text" name="name"><br>
    年龄:<input type="text" name="age"><br>
    性别:<input type="text" name="gender"><br>
    班级：<select name="banjiId">
            <%
                List<Banji> list = (List<Banji>) request.getAttribute("list");
                for (Banji banji : list) {
            %>
                    <option value="<%=banji.getId()%>"><%=banji.getName()%></option>
            <%
                }
            %>
         </select>
    <input type="submit" value="添加">
</form>
</body>
</html>